﻿/*
 * This software is the confidential and proprietary
 * information of NetBay
 * Such confidential information should not be disclosed
 * NetBay copyright(c) 2010
 */

#region Using
using System;
using System.Collections.Generic;
using System.ServiceModel.DomainServices.Hosting;
using System.ServiceModel.DomainServices.Server;
using NetBay.Core.Log;
using Rio.Framework.Business.Repository;
using NetBay.Core.BusinessEntities;
using System.ServiceModel;
using System.ComponentModel;
#endregion

namespace Rio.Applications.Web.Services
{
    // TODO: Create methods containing your application logic.
    [EnableClientAccess(RequiresSecureEndpoint = false)]
    public class GUIDomainService : DomainService //, RioActionsServices.IRioActionsServiceCallback, INotifyPropertyChanged
    {
        /// <summary>
        /// Returns all the values of an index
        /// </summary>
        /// <param name="p_lFolderTypeId">FolderType Identifier</param>
        /// <param name="p_sIndexOrder">Index Order</param>
        /// <returns>the list of all values of this index</returns>
        [Invoke]
        public Dictionary<long, string> GetIndexValueList(long p_lFolderTypeId, string p_sIndexOrder)  
        {
            var l_szRet = new Dictionary<long, string>();
            try
            {
                l_szRet = GUIRepository.GetFilterValueList(p_lFolderTypeId, p_sIndexOrder);
            }
            catch (Exception ex)
            {
                LogManager.Instance().LogError(" EXCEPTION -> " + Environment.NewLine + ex);
            }
            return l_szRet;
        }


        /// <summary>
        /// Return the specified settings
        /// </summary>
        /// <returns>The value of the setting</returns>
        [Invoke]
        public int GetthumbNailCount(long p_lUserId)
        {
            //RioWCFServices.WCFServiceClient l_oWCFRioServices = new RioWCFServices.WCFServiceClient();
            //RioWCFServices.ConvertWORDToPDFResponse l_oDocumentInPDFResponse = l_oWCFRioServices.ConvertWORDToPDF(new RioWCFServices.ConvertWORDToPDFRequest(p_sSourceFullPathFileName));
            //ReturnLong l_oReturnLong = l_oDocumentInPDFResponse.ConvertWORDToPDFResult;
            
            //if (l_oReturnLong.IsValid)
            //{
            //    throw new Exception("Unable to get ThmbNailCount for user [" + p_lUserId + "]");
            //}

            //return l_oReturnLong.Value;

            return 1;
        }




        
    }
}
